package com.example.springcloudconfig.web.feigin;


import com.example.springcloudconfig.bean.User;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;


@FeignClient(value="spring-cloud-order",fallback = OrderActionHystrix.class)
public interface OrderAction {

    @RequestMapping("order")
    String order();
    @RequestMapping("hello")
    String hello(@RequestParam("name") String name);


    @RequestMapping("hello/{name}")
    String hello1(@PathVariable("name") String name);

    @RequestMapping("add")
    int add(@RequestParam("a") int a, @RequestParam("b")  int b);


    @RequestMapping("showMe")
    User showme(@RequestBody User user,@RequestParam String newName);

}


